//
// Nibbler.hh for Nibbler in /home/florian/nibbler
// 
// Made by Florian Coulon
// Login   <coulon_a@epitech.net>
// 
// Started on  Thu Mar  1 01:48:19 2012 Florian Coulon
// Last update Thu Mar  1 01:48:21 2012 Florian Coulon
//

#ifndef NIBBLER_HH
#define NIBBLER_HH

#include    "Objects.hh"

typedef enum    list_key
{
    UP,
    DOWN,
    LEFT,
    RIGHT,
    ESCAPE,
    PAUSE,
    QUIT,
    SPACE
}   t_key;

class Nibbler
{
public:
    Nibbler(char **av);
    ~Nibbler();

    void        exec();
    void        gen_map();
    void        aff_map();
    bool        key_event(t_key);
protected:
    Objects       **map;
private:

    bool    move_down();
    void    move_left();
    void    move_up();
    void    move_right();

    void    put_in_paused();
    void    quit_game();
    void    speed_running();

    int    x;
    int    y;
};

#endif // NIBBLER_HH
